December 24, 2017

Iris Classification

  • This app is created to classify iris, based on the attributes specified in "Edgar Anderson's Iris Data":

    Sepal Length, Sepal Width, Petal Length, Petal Width

  • When user keys in the values for the attributes, a prediction will be made.
  • For demonstration purpose, we will use the values below as example.
    • Sepal Length = 6cm
    • Sepal Width = 3cm
    • Petal Length = 6cm
    • Petal Width = 2cm

Apps Demonstration: Prediction

Creating the model

irisModel <- train(Species~ .,data=iris,method="rf",prox=TRUE)

Loading input into the model

inputData <- data.frame(Sepal.Length = 6, Sepal.Width = 3,
                        Petal.Length = 6, Petal.Width = 2)
result <- predict(irisModel, inputData)
result
## [1] virginica
## Levels: setosa versicolor virginica

Apps Demonstration: 1st Scatter Plots

The measurement of new flower is shown by the diamond shape.

Apps Demonstration: 2nd Scatter Plots

This figure plots the "width" variables against each other.